import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';

import 'colors.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';

class TextStyles {
  static TextStyle textStyle(Color color, double size,
      {FontWeight fontWeight = FontWeight.w400}) {
    return TextStyle(color: color, fontSize: size, fontWeight: fontWeight);
  }

  static TextStyle loginStyle =
      TextStyle(color: const Color(0xFF1C2081), fontSize: 18.sp);

  static TextStyle loginStyleWhite =
      TextStyle(color: ColorStyle.white, fontSize: 18.sp);

  ////borderType 0无圆角 1上圆角 2下圆角
  static BorderRadius rowCornerRadius(int type) {
    if (type == 0) {
      return BorderRadius.zero;
    } else if (type == 1) {
      return BorderRadius.only(
          topLeft: Radius.circular(20.w), topRight: Radius.circular(20.w));
    } else if (type == 2) {
      return BorderRadius.only(
          bottomLeft: Radius.circular(20.w),
          bottomRight: Radius.circular(20.w));
    } else {
      return BorderRadius.all(Radius.circular(20.w));
    }
  }

  static EdgeInsetsGeometry edgeSpace16LeftAndRight() {
    return EdgeInsets.only(left: 16.w, right: 16.w);
  }

  static Widget lineView() {
    return Container(
      height: 1.h,
      color: const Color(0xfff7f7f7),
    );
  }
}
